SftTree/OCX 7.0

SftTree.ItemExpandAll Property

Softel vdm, Inc.

Defines an item and all its dependents as expanded or collapsed.

Deprecated - Provided for compatibility with earlier versions only - Use Item.Expand or Item.Collapse instead

Syntax       

Put

VB.NET

object.ItemExpandAll(ByVal ItemIndex As Integer) = (null)  As Boolean

VB

object.ItemExpandAll(ByVal ItemIndex As Long) = (null)  As Boolean

C#.NET

void object.set_ItemExpandAll(int ItemIndex, bool (null));

VC++

VARIANT_BOOL object->ItemExpandAll[long ItemIndex] = (null);
void object->PutItemExpandAll(long ItemIndex, VARIANT_BOOL (null));

C

HRESULT object->put_ItemExpandAll(long ItemIndex, VARIANT_BOOL (null));

Delphi

object.ItemExpandAll[ItemIndex : Integer] := (null)   : WordBool;

object

A SftTree object.

ItemIndex

 The zero-based index of the item to be expanded or collapsed.

Boolean

Defines whether the item is expanded or collapsed.

Boolean

Description

True

The item is expanded.  All immediate and indirect dependents of the specified item are made visible.

False

The item is collapsed.  All immediate and indirect dependents of the specified item are hidden.

Comments

Deprecated - Provided for compatibility with earlier versions only - Use Item.Expand or Item.Collapse instead

The ItemExpandAll property defines an item and all its dependents as expanded or collapsed.

If an item is already expanded when setting ItemExpandAll to True, the item remains unchanged.  It does not make any indirect dependents visible.  To make sure that an item's indirect dependents are shown, ItemExpandAll can be set to False first, which collapses the item (and all dependents), followed by setting ItemExpandAll to True.  Now all dependents are visible.

An item has to be currently shown to be expanded or collapsed.  If the item is not shown, its state cannot be modified.  The Item.Shown property can be used to determine if an item is shown.

The Item.DependentCount property can be used to determine if an item can be expanded.  If an item doesn't have any dependents, it is a leaf item and cannot be expanded.  However, it is not an error to use ItemExpandAll with a leaf item.

The ItemExpandAll property does not restore the expand/collapse state of its dependent items.  Use Items.Expand, Item.Expand, Items.Collapse and Item.Collapse to preserve or restore this information.

See Also  SftTree Object | Object Hierarchy


Feedback / comments / error reports for this topic
© 2015 - Softel vdm, Inc. - www.softelvdm.com